home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #2 / Software USA Volume 4.02.iso / mac / Education / Intelligent Chaos PPC / Execution sourcecode < prev    next >
Encoding:
Text File  |  1997-12-24  |  731 b   |  31 lines  |  [TEXT/R*ch]

  1. Dim a as double
  2. Dim x as double
  3. Dim result as double
  4. Dim resultAsString as string   
  5. Dim ggr as Integer //the looping variable
  6. Dim xtimes as Integer
  7. xtimes=Val(EditField3.text) //the Number of times field
  8. if xtimes>99 then
  9.     ProgressBar1.visible=true
  10.     ProgressBar1.maximum=xtimes
  11.     for ggr=1 to xtimes
  12.         a = Val(EditField1.text)    
  13.         x = Val(EditField2.text)
  14.         result = a*x*(1-x)
  15.         resultAsString = Str(result)
  16.         Listbox1.addrow resultAsString
  17.         EditField2.text=resultAsString
  18.         ProgressBar1.value=ggr
  19.     next
  20.     ProgressBar1.visible=false
  21. else
  22. for ggr=1 to xtimes
  23.     a = Val(EditField1.text)
  24.     x = Val(EditField2.text)
  25.     result = a*x*(1-x)
  26.     resultAsString = Str(summa)
  27.     Listbox1.addrow resultAsString
  28.     EditField2.text=resultAsString
  29. next
  30. end
  31.